#include <iostream>
#include <set>
using std::cout;
using std::cin;
using std::endl;
using std::set;
template <typename T>
T add(T t1, T t2) {
    return t1 + t2;
}

template <>
set<int> add<set <int>>(set <int> t1, set <int> t2) {
    set <int> temp(t1);
    auto it_begin = t2.begin();
    auto it_end = t2.end();
    temp.insert(it_begin, it_end);
    return temp;
}

void test() {
    double sum1 = add(1, 1);
    double sum2 = add(1.1, 1.1);
    cout << sum1 << endl;
    cout << sum2 << endl;
    set <int> set1({ 1,2,3 });
    set <int> set2({ 2,3,4,5 });
    set <int> sum3 = add(set1, set2);
    for (auto e : sum3) {
        cout << e << " ,";
    }
    cout << endl;
}
int main() {
    test();
    return 0;
}